package cn.tom.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class Book {
    private Integer id;
    private String name; //商品名称
    private String sn; //商品序号
    private Double price; //销售价格
    private Double price2; //会员价
    private String maker; //厂家出版社
    /*@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")*/
    //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date tmake; //出版日期
    /*private Integer typeid; //商品类型*/
    private Type type = new Type();;
    private String pic; //封面
    private String author; //作者
    private Integer salenum; //月销量
    private Integer stock; //库存数
    private String info; //商品详情
    private String info2; //商品详情2


    public Book() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Double getPrice2() {
        return price2;
    }

    public void setPrice2(Double price2) {
        this.price2 = price2;
    }

    public String getMaker() {
        return maker;
    }

    public void setMaker(String maker) {
        this.maker = maker;
    }

    public Date getTmake() {
        return tmake;
    }

    public void setTmake(Date tmake) {
        this.tmake = tmake;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Integer getSalenum() {
        return salenum;
    }

    public void setSalenum(Integer salenum) {
        this.salenum = salenum;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getInfo2() {
        return info2;
    }

    public void setInfo2(String info2) {
        this.info2 = info2;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sn='" + sn + '\'' +
                ", price=" + price +
                ", price2=" + price2 +
                ", maker='" + maker + '\'' +
                ", tmake=" + tmake +
                ", type=" + type +
                ", pic='" + pic + '\'' +
                ", author='" + author + '\'' +
                ", salenum=" + salenum +
                ", stock=" + stock +
                ", info='" + info + '\'' +
                ", info2='" + info2 + '\'' +
                '}';
    }
}
